﻿namespace Devonline.Entity;

/// <summary>
/// 订单货运单
/// </summary>
[DisplayName("订单货运单")]
public class OrderTransportViewModel : OrderTransportViewModel<string>, IViewModel, IEntitySet
{
    /// <summary>
    /// 货运单
    /// </summary>
    public virtual TransportViewModel? Transport { get; set; }
}

/// <summary>
/// 订单货运单
/// </summary>
[DisplayName("订单货运单")]
public abstract class OrderTransportViewModel<TKey> : ViewModel<TKey>, IViewModel<TKey>, IEntitySet<TKey> where TKey : IConvertible
{
    /// <summary>
    /// 订单编号
    /// </summary>
    [DisplayName("订单编号"), Required, MaxLength(36), Excel]
    public virtual TKey OrderId { get; set; } = default!;
    /// <summary>
    /// 货运单编号
    /// </summary>
    [DisplayName("货运单编号"), Required, MaxLength(36), Excel]
    public virtual TKey TransportId { get; set; } = default!;
}